-- GENERATED SPELL FOR [Dragonflayer Overseer] --


function spell0_24085(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(38232,pUnit)
pUnit:RegisterEvent('Sorts_24085', 20319, 1)
end

function spell1_24085(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(59614,pUnit)
pUnit:RegisterEvent('Sorts_24085', 20328, 1)
end

function spell2_24085(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(35570,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24085', 2337, 1)
end

function spell3_24085(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(59611,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24085', 2333, 1)
end

function spell4_24085(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(16244,pUnit)
pUnit:RegisterEvent('Sorts_24085', 30258, 1)
end

function spell5_24085(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(59613,pUnit)
pUnit:RegisterEvent('Sorts_24085', 30262, 1)
end

function Sorts_24085(pUnit, Event)
local choix_sorts_24085 = math.random(0, 5)
if choix_sorts_24085 == 0 then
pUnit:RegisterEvent('spell0_24085', 1, 1)
end
if choix_sorts_24085 == 1 then
pUnit:RegisterEvent('spell1_24085', 1, 1)
end
if choix_sorts_24085 == 2 then
pUnit:RegisterEvent('spell2_24085', 1, 1)
end
if choix_sorts_24085 == 3 then
pUnit:RegisterEvent('spell3_24085', 1, 1)
end
if choix_sorts_24085 == 4 then
pUnit:RegisterEvent('spell4_24085', 1, 1)
end
if choix_sorts_24085 == 5 then
pUnit:RegisterEvent('spell5_24085', 1, 1)
end
end

function mob24085_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24085', math.random(1500, 3000), 1)
end

function mob24085_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24085_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24085_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24085, 1, 'mob24085_Action')
RegisterUnitEvent(24085, 2, 'mob24085_Leave')
RegisterUnitEvent(24085, 3, 'mob24085_Kill')
RegisterUnitEvent(24085, 4, 'mob24085_Die')
